﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://wubiyu.cnblogs.com">
<head>
      <title></title>
      <link href="../../Theme/DomExtGray/gray.min.css" rel="Stylesheet" type="text/css" />
      <link href="PageModel.css" rel="Stylesheet" type="text/css" />
      <script type="text/javascript" src="../../domExt.js"></script>
      <style type="text/css">

 p.MsoNormal
	{margin-bottom:.0001pt;
	text-align:justify;
	text-justify:inter-ideograph;
	font-size:10.5pt;
	font-family:"Calibri","sans-serif";
	              margin-left: 0cm;
                  margin-right: 0cm;
                  margin-top: 0cm;
            }
      </style>
</head>
<body>
       <h:windows>
      </h:windows>
      <div class="fun_title">
             &lt;h:windows&gt;&lt;/h:windows&gt;窗口管理标记
      </div>
      <div class="fun_content">
            描述：此标记在一页中有且只有一个。此标记定义当前页的窗口管理对象，用于管理当前页上的所有 <a  href="Window.htm" >&lt;h:window&gt;</a> 
            的对象。<br />
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 使用这标记时，注意如果&lt;body&gt;下面的第一个标记为&lt;h:layout&gt;就将其它在文档末尾及&lt;/body&gt;之前，否则放在文档开始处 
            &lt;body&gt;之后</div>
      <div class="fun_title2">
            属性:
      </div>
      <div class="fun_content2">
            wmask：窗口遮罩。<br />
            witems：&lt;h:widnow&gt; 对象集合。<br />
            TaskBox：任务栏对象，此都象是一个 &lt;h:listview&gt; 对象。作用是将&lt;h:listview&gt;对象赋值给此属性，窗口管理对象会将其初始化一个任务栏。<br />
      </div>
        <div class="fun_title2">
            对象方法:
      </div>
       <div class="fun_content2">
          <span> SetData(datas)</span> ：设置数据源。<br />
      </div>
      <div class="fun_title2">
            静态方法:
      </div>
       <div class="fun_content2">
          <span> _h.Windows.AddWindow(e)</span> ：将一个window对象添加到窗口管理对象中。<br />
          <span>_h.Windows.GetWindow(id)</span> ：根据窗口id获到窗口对象。<br />
          <span>_h.Windows.GetWindowIndex(id)</span> ：根据Id获到窗口在窗口管理对象中的索引。<br />
          <span>_h.Windows.ShowWindow(id)</span> ：显示窗口。<br />
          <span>_h.Windows.CloseWindow(id)</span> ：关闭一个窗口，执行此方法窗口将会被移出窗口管理对象。<br />
          <span>_h.Windows.OpenWindow(id)</span> ：打开一个窗口，执行此方法窗口将会被加入到窗口理对象。<br />
          <span>_h.Windows.CreateWindow(id, caption, content, hposition, type)</span>：创建一个窗口。将自动加入到窗口管理对象中。<br />
          &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
          <span>hposition</span>：输入“top,left,width,height",例如："0,0,800,500"
             <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
          <span>type</span>：可以是 "m" 和 "w"。"m"：模态窗口，"w"：普通窗口。默认：为 "w"</div>
          <div id="msg" class="fun_title2">
            示例预览:
      </div>
      <div class="code">
      <h:btn id="showbtn">显示窗口</h:btn>
      </div>
       <div class="fun_title2">
            示例代码:
      </div>
       <div class="code">
             Html code
             <p align="left" class="MsoNormal">
                   <span lang="EN-US" style="font-size:9.5pt;font-family:
&quot;Microsoft YaHei&quot;;mso-bidi-font-family:&quot;Microsoft YaHei&quot;;color:blue;mso-font-kerning:
0pt">&lt;</span><span lang="EN-US" style="font-size:9.5pt;font-family:&quot;Microsoft YaHei&quot;;
mso-bidi-font-family:&quot;Microsoft YaHei&quot;;color:maroon;mso-font-kerning:0pt">script</span><span 
                         lang="EN-US" style="font-size:9.5pt;font-family:&quot;Microsoft YaHei&quot;;mso-bidi-font-family:
&quot;Microsoft YaHei&quot;;mso-font-kerning:0pt"> <span style="color:red">type</span><span 
                         style="color:blue">=&quot;text/javascript&quot;&gt;</span><o:p></o:p></span></p>
             <p align="left" class="MsoNormal">
                   <span lang="EN-US" 
                         style="font-size:9.5pt;font-family:
&quot;Microsoft YaHei&quot;;mso-bidi-font-family:&quot;Microsoft YaHei&quot;;mso-font-kerning:0pt">
                   <span style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>
                   <span style="color:#404040">_h</span>.ready(functi<span style="color:blue">on () 
                   {<o:p></o:p></span></span></p>
             <p align="left" class="MsoNormal">
                   <span lang="EN-US" 
                         style="font-size:9.5pt;font-family:
&quot;Microsoft YaHei&quot;;mso-bidi-font-family:&quot;Microsoft YaHei&quot;;mso-font-kerning:0pt">
                   <span style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                   </span>var testwidn<span style="color:
blue">ow </span>= <span style="color:#404040">_h</span>.Windows.CreateWindow(&quot;testWidnow&quot;<span 
                         style="color:maroon">, &quot;&amp;nbsp;wubiyu.cnblogs.com</span></span><span 
                         lang="EN-US" style="font-size:9.5pt;font-family:&quot;Microsoft YaHei&quot;;mso-bidi-font-family:
&quot;Microsoft YaHei&quot;;color:maroon;mso-font-kerning:0pt">&quot;, &quot;&lt;iframe s</span><span 
                         lang="EN-US" style="font-size:9.5pt;font-family:&quot;Microsoft YaHei&quot;;
mso-bidi-font-family:&quot;Microsoft YaHei&quot;;mso-font-kerning:0pt">rc<span 
                         style="color:maroon">=&#39;</span><span style="color:#404040">http</span><span 
                         style="color:maroon">://wubiyu.cnblogs.com&#39; width=&#39;100%&#39; height=&#39;100%&#39; 
                   frameborder=&#39;0&#39;&gt;&lt;/iframe&gt;&quot;, null, &quot;m&quot;)</span>;<o:p></o:p></span></p>
             <p align="left" class="MsoNormal">
                   <span lang="EN-US" style="font-size:9.5pt;font-family:
&quot;Microsoft YaHei&quot;;mso-bidi-font-family:&quot;Microsoft YaHei&quot;;color:blue;mso-font-kerning:
0pt"><span style="mso-spacerun:yes">&nbsp;&nbsp; </span></span>
                   <span lang="EN-US" style="font-size:9.5pt;font-family:&quot;Microsoft YaHei&quot;;mso-bidi-font-family:&quot;Microsoft YaHei&quot;;
mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp;&nbsp;</span><span style="color:maroon"><span 
                         style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp;</span></span><span style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp;&nbsp;</span>_h.Window.Hid(testwidnow);<o:p></o:p></span></p>
             <p align="left" class="MsoNormal">
                   <span lang="EN-US" 
                         style="font-size:9.5pt;font-family:
&quot;Microsoft YaHei&quot;;mso-bidi-font-family:&quot;Microsoft YaHei&quot;;mso-font-kerning:0pt">
                   <span style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                   </span>var showbtn = _g(&quot;#showb<span style="color:blue">tn&quot;</span>);<o:p></o:p></span></p>
             <p align="left" class="MsoNormal">
                   <span lang="EN-US" 
                         style="font-size:9.5pt;font-family:
&quot;Microsoft YaHei&quot;;mso-bidi-font-family:&quot;Microsoft YaHei&quot;;mso-font-kerning:0pt">
                   <span style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                   </span><span style="color:maroon"><span style="mso-spacerun:yes">&nbsp;&nbsp;</span>_h.addEv</span>ent(showbtn, 
                   &quot;click&quot;, function () {<o:p></o:p></span></p>
             <p align="left" class="MsoNormal">
                   <span lang="EN-US" 
                         style="font-size:9.5pt;font-family:
&quot;Microsoft YaHei&quot;;mso-bidi-font-family:&quot;Microsoft YaHei&quot;;mso-font-kerning:0pt">
                   <span style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>
                   <span style="color:maroon"><span style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span><span 
                         style="mso-spacerun:yes">&nbsp;&nbsp;</span><span style="color:blue"><span 
                         style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp;</span>if (t</span>estwidnow.isactive == 
                   &quot;false&quot;)<o:p></o:p></span></p>
             <p align="left" class="MsoNormal">
                   <span lang="EN-US" style="font-size:9.5pt;font-family:
&quot;Microsoft YaHei&quot;;mso-bidi-font-family:&quot;Microsoft YaHei&quot;;color:blue;mso-font-kerning:
0pt"><span style="mso-spacerun:yes">&nbsp;</span></span><span lang="EN-US" style="font-size:9.5pt;font-family:&quot;Microsoft YaHei&quot;;mso-bidi-font-family:&quot;Microsoft YaHei&quot;;
mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                   </span>_h<span style="color:maroon">.Window</span>s.OpenWindow(&quot;testWidnow&quot;);<o:p></o:p></span></p>
             <p align="left" class="MsoNormal">
                   <span lang="EN-US" 
                         style="font-size:9.5pt;font-family:
&quot;Microsoft YaHei&quot;;mso-bidi-font-family:&quot;Microsoft YaHei&quot;;mso-font-kerning:0pt">
                   <span style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                   </span>});<o:p></o:p></span></p>
             <p align="left" class="MsoNormal">
                   <span lang="EN-US" 
                         style="font-size:9.5pt;font-family:
&quot;Microsoft YaHei&quot;;mso-bidi-font-family:&quot;Microsoft YaHei&quot;;mso-font-kerning:0pt">
                   <span style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>});<span 
                         style="color:maroon"><o:p></o:p></span></span></p>
             <p align="left" class="MsoNormal">
                   <span lang="EN-US" style="font-size:9.5pt;font-family:
&quot;Microsoft YaHei&quot;;mso-bidi-font-family:&quot;Microsoft YaHei&quot;;color:blue;mso-font-kerning:
0pt">&lt;/</span><span lang="EN-US" style="font-size:9.5pt;font-family:&quot;Microsoft YaHei&quot;;
mso-bidi-font-family:&quot;Microsoft YaHei&quot;;color:maroon;mso-font-kerning:0pt">script</span><span 
                         lang="EN-US" style="font-size:9.5pt;font-family:&quot;Microsoft YaHei&quot;;mso-bidi-font-family:
&quot;Microsoft YaHei&quot;;color:blue;mso-font-kerning:0pt">&gt;<o:p></o:p></span></p>
       </div>

<script type="text/javascript">
      _h.ready(function () {
            var testwidnow = _h.Windows.CreateWindow("testWidnow", "&nbsp;wubiyu.cnblogs.com", "<iframe src='http://wubiyu.cnblogs.com' width='100%' height='100%' frameborder='0'></iframe>", null, "m");
            var showbtn = _g("#showbtn");
            _h.addEvent(showbtn, "click", function () {
                  if (testwidnow.isactive == "false")
                        _h.Windows.OpenWindow("testWidnow");
            });
      });
</script>
      
</body>
</html>
